////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		CMasterHand.h
//
//		Author			:		Lane Shapiro
//
//		Purpose			:		A header for all functions and members of the CMasterHand class
//
//		Dates			:		Written( April 1, 2011 ) by Lane Shapiro
//	
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CMASTERHAND_H_
#define CMASTERHAND_H_

#include "CBaseObject.h"
#include "../Animation/CAnimation.h"

#include <vector>
using std::vector;

class CBaseEnemy;

class CMasterHand : public CBaseObject
{
private:
	RECT handRect;

	vector<CAnimation> vAnimation;
	int currAnimation;

	vector<CAnimation> vAnimation2;
	int currAnimation2;

	float scale;

	float pinchTimer;
	float pinchTimerMax;

	bool holdingEnemy;
	bool holdingPinch;
	bool poison;
	bool rockActive;
	bool rockEquiped;

	bool levelUp;

	float rockTimer;
	float HotOilTimer;
	float BallistaTimer;

	float poisonCooldown;
	float poisonCooldownMax;
	float RockCoolDown;
	float RockCoolDownMax;
	float BallistaCoolDown;
	float BallistaCoolDownMax;
	float HotOilCoolDown;
	float HotOilCoolDownMax;
	float ArcherCoolDown;
	float ArcherCoolDownMax;

	int level;
	int RockLevel;
	int ArcherLevel;

	float xp;
	float neededxp;

	//CBaseEnemy* enemyInHand;

public:

	CMasterHand();
	~CMasterHand();

	void Render();
	bool Input();
	void Update(float fElapsedTime);

	float GetXP()					{ return xp;				}
	void SetXP(float newxp)			{ xp = newxp;				}
	float GetNeededXP()				{ return neededxp;			}
	void SetNeededXP(float newxp)	{ neededxp = newxp;			}
	void GainXP(float AmountGained) { xp += AmountGained;		}

	float GetPinchTimer()			{ if(pinchTimer > pinchTimerMax)
											pinchTimer = pinchTimerMax;
										return pinchTimer;		}
	float GetPinchTimerMax()		{ return pinchTimerMax;		}

	float GetPoisonCoolDown()		{ return poisonCooldown;	}
	float GetPoisonCoolDownMax()	{ return poisonCooldownMax;	}
	float GetRockCoolDown()			{ return RockCoolDown;		}
	float GetRockCoolDownMax()		{ return RockCoolDownMax;	}
	float GetBallistaCoolDown()		{ return BallistaCoolDown;	}
	float GetBallistaCoolDownMax()	{ return BallistaCoolDownMax;}
	float GetHotOilCoolDown()		{ return HotOilCoolDown;	}
	float GetHotOilCoolDownMax()	{ return HotOilCoolDownMax;	}
	float GetArcherCoolDown()		{ return ArcherCoolDown;	}
	float GetArcherCoolDownMax()	{ return ArcherCoolDownMax;	}

	bool GetRockEquiped()	{return rockEquiped;}
	void SetRockEquiped(bool isEquiped)	{rockEquiped = isEquiped;}
	void EquiptRock();
	void EquiptPoison();
	void EquiptPinch();
	void PourOil();
	void FireBallista();
	void BuyArcher();

	bool CheckCollision( IBaseInterface* pBase );
	bool GetPoison() { return poison; }
	void SetPoison(bool on) { poison = on; }

	RECT GetCollisionRect();
	RECT GetCursorBox();

	int GetLevel()			{ return level; }
	int GetRockLevel()		{ return RockLevel; }
	int GetArcherLevel()	{ return ArcherLevel; }

	bool GetHoldingPinch()	{return holdingPinch; }
	bool GetHoldingEnemy()	{return holdingEnemy; }
	void SetHoldingEnemy(bool holding)	{holdingEnemy = holding; }

	bool GetRockActive()	{return rockActive; }
	void SetRockActive(bool isActive)	{rockActive = isActive;}

	int GetCurAnimation()	{ return currAnimation; }
	void SetCurAnimation(int newState) { currAnimation = newState; }

	bool Load( const char* AnimInfo);
	bool Load2( const char* AnimInfo);

	void RockLevelUp();
};

#endif